package com.example.demo.mapper;

import com.example.demo.entity.Comment;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CommentMapper {
    int insertComment(Comment comment);
    Comment selectCommentById(Long commentId);
    List<Comment> selectCommentsByPostId(Long postId);
    List<Comment> selectCommentsByAuthorId(Long authorId);
    int updateComment(Comment comment);
    int incrementLikeCount(Long commentId);
    int decrementLikeCount(Long commentId);
    int deleteComment(Long commentId);
    int deleteCommentsByPostId(Long postId);
}